package com.tiyunge.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tiyunge.system.domain.SysKnowledge;
import com.tiyunge.system.mapper.SysKnowledgeMapper;
import com.tiyunge.system.service.ISysKnowledgeService;

/**
 * 知识看点Service业务层处理
 * 
 * @author yejiayu
 */
@Service
public class SysKnowledgeServiceImpl implements ISysKnowledgeService 
{
    @Autowired
    private SysKnowledgeMapper sysKnowledgeMapper;

    /**
     * 查询知识看点
     * 
     * @param knowledgeId 知识看点主键
     * @return 知识看点
     */
    @Override
    public SysKnowledge selectSysKnowledgeByKnowledgeId(Long knowledgeId)
    {
        return sysKnowledgeMapper.selectSysKnowledgeByKnowledgeId(knowledgeId);
    }

    /**
     * 查询知识看点列表
     * 
     * @param sysKnowledge 知识看点
     * @return 知识看点
     */
    @Override
    public List<SysKnowledge> selectSysKnowledgeList(SysKnowledge sysKnowledge)
    {
        return sysKnowledgeMapper.selectSysKnowledgeList(sysKnowledge);
    }

    /**
     * 新增知识看点
     * 
     * @param sysKnowledge 知识看点
     * @return 结果
     */
    @Override
    public int insertSysKnowledge(SysKnowledge sysKnowledge)
    {
        return sysKnowledgeMapper.insertSysKnowledge(sysKnowledge);
    }

    /**
     * 修改知识看点
     * 
     * @param sysKnowledge 知识看点
     * @return 结果
     */
    @Override
    public int updateSysKnowledge(SysKnowledge sysKnowledge)
    {
        return sysKnowledgeMapper.updateSysKnowledge(sysKnowledge);
    }

    /**
     * 批量删除知识看点
     * 
     * @param knowledgeIds 需要删除的知识看点主键
     * @return 结果
     */
    @Override
    public int deleteSysKnowledgeByKnowledgeIds(Long[] knowledgeIds)
    {
        return sysKnowledgeMapper.deleteSysKnowledgeByKnowledgeIds(knowledgeIds);
    }

    /**
     * 删除知识看点信息
     * 
     * @param knowledgeId 知识看点主键
     * @return 结果
     */
    @Override
    public int deleteSysKnowledgeByKnowledgeId(Long knowledgeId)
    {
        return sysKnowledgeMapper.deleteSysKnowledgeByKnowledgeId(knowledgeId);
    }
}
